import { getUser } from '@/api/account';

const actions = {

    // 获取用户基本信息
    getUser ({commit}){
        getUser().then(res => {
            if(res.message === 'success'){
                const { data: {userName, userCode} } = res;
                commit('getUser', {
                    userName,
                    userCode
                })
            }
        })
    }
};

export default actions